array practice problems in cpp